<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName()
			+ ":" + request.getServerPort() + request.getContextPath();
%>
<jsp:include page="/WEB-INF/page/auth/_header.jsp"></jsp:include>
<body>
	<jsp:include page="/WEB-INF/page/auth/header.jsp"></jsp:include>
	<div id="middle">
		<jsp:include page="/WEB-INF/page/auth/menu.jsp"></jsp:include>
		<div id="right">
		    <div id="teacher_querytb">
		        <form id="teacher_queryForm" class="m10">
		           	 年级：
		            <select class="form-control1" name="grade" id="grade"></select>
		                             学科：
		            <select class="form-control1" name="subjectId" id="subjectId"></select>
		                             教师姓名：
		            <input class="form-control1" type="text" name="teacherName" id="teacherName">
					<input type="hidden" id="schoolId" name="schoolId" value=""/>
		            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('teacher_query')">查询</a>
		            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm('teacher_query')">重置</a><br/>
		        </form>
		    </div>
		    <table id="teacher_querydg">
		        <thead>
		            <tr>
		                <th data-options="field:'name',title:'姓名',width:15"></th>
		                <th data-options="field:'grade',title:'年级名称',width:15,formatter:function(value,row,index){
		                    return row.gradeText;
		                }"></th>
		                <th data-options="field:'subjectId',title:'学科名称',width:15,formatter:function(value,row,index){
		                    return row.subjectText;
		                }"></th>
		                <th data-options="field:'mobile',title:'手机号',width:15"></th>
		            </tr>
		        </thead>
		    </table>
		</div>
	</div>
	<jsp:include page="/WEB-INF/page/auth/_footer.jsp"/>
	<script type="text/javascript">
        $(function(){
            var url = basePath + "/sys/teacher/query";
			initSchoolIdInputValue();
            initDatagrid("teacher_query", url);
            initGrade("teacher_query");
            initSubject("teacher_query");
        })
		function initSchoolIdInputValue() {
			var value1 = $("#userSchoolId").val();
			var value2 = document.getElementById("schoolId");
			value2.value = value1;
		}
    </script>
</body>
</html>